/**
 * 打包入口文件
 * 初始化
 */
/* import the fontawesome core */
import { library } from '@fortawesome/fontawesome-svg-core'
/* import font awesome icon component */
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
/* import fas icons */
import { fas } from '@fortawesome/free-solid-svg-icons'

/* add icons to the library */
library.add(fas);

// 引入样式文件
import "@/styles/index.scss";

// 引入自定义组件
import Icon from './components/Icon/Icon.vue'
import Button from './components/Button'
import Card from './components/Card'
import Dialog from './components/Dialog'
import Pager from './components/Pager'
// import Collapse from './components/Collapse/Collapse.vue'
// import CollapseItem from './components/Collapse/CollapseItem.vue'
import { Collapse, CollapseItem } from "./components/Collapse";
import Tooltip from './components/Tooltip'
import Dropdown from './components/Dropdown'

const componentArr = [Icon, Button, Card, Dialog, Pager, Collapse, CollapseItem, Tooltip, Dropdown];
/**
 * 自定义组件全局注入
 * @param app vue实例
 */
const install = (app)=> {
    console.log(app.__proto__);
    componentArr.forEach(component => {
        app.component(component.name, component);
    });
    app.component("font-awesome-icon", FontAwesomeIcon);
}
// 全部导出
export default {
    install
};
// 按需导出
// 按需导出
export { install, Icon, Button, Card, Dialog, Pager, Collapse, CollapseItem, Tooltip, Dropdown }